package lab02.Test30;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        //System.out.println("请输入成绩：");
        Scanner sc = new Scanner(System.in);
        int[] secore = new int[3];
        int sum=0,average=0;
        for (int i = 0; i <secore.length; i++) {
            System.out.println("请输入第"+(i+1)+"个成绩");
            secore[i] = sc.nextInt();
            sum=secore[i]+sum;
            average=sum/(i+1);
        }

        System.out.println("平均成绩为："+average);
    }
}
